﻿using Cms.Core.Application.Service.ModuleInfo.Dto;
using Cms.Core.Infrastructure.Dependency;
using Cms.Core.Infrastructure.Ui;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Cms.Core.Application.IService.ModuleInfo
{
    /// <summary>
    /// 模块API接口
    /// </summary>
    public interface IModuleService : ITransientDependency
    {


        /// <summary>
        /// 添加模块API
        /// </summary>
        /// <param name="input"></param>
        /// <param name="checkModuleFunc"></param>
        /// <returns></returns>
        Task<OperationResult> AddModuleAsync(ModuleDto input, Func<string, string, Guid, Task> checkModuleFunc);

        /// <summary>
        /// 异步更新或者更新模块API
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<OperationResult> UpdateOrAddModuleAsync(ModuleDto input);

        /// <summary>
        /// 更新模块API异步
        /// </summary>
        /// <param name="input"></param>
        /// <param name="checkModuleFunc"></param>
        /// <returns></returns>
        Task<OperationResult> UpdateModuleAsync(ModuleDto input, Func<string, string, Guid, Task> checkModuleFunc);

        /// <summary>
        /// 得到模块API分页信息
        /// </summary>
        /// <param name="pageRequestData">分页请求数据</param>
        /// <returns></returns>

        Task<PageResult> GetModulePageDataAsync(PageRequestData pageRequestData);

        /// <summary>
        /// 异步软删除
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        Task<OperationResult> SoftDeleteModuleAsync(Guid id);

        /// <summary>
        ///得到所有模块转成下拉项
        /// </summary>
        Task<OperationResult> GetAllModuleToSelectItem();
    }
}
